package com.hxh.wechat.model

import java.util.*

data class ContactFriend(
    val friendUserId: String,
    val friendUsername: String,
    val friendFaceImage: String,
    val friendNickname: String,
)


data class UserInfo(
    val id: String,
    val username: String,
    val faceImage: String,
    val faceImageBig: String,
    val nickname: String,
    val qrcode: String,
    val auto: Boolean
)

data class Msg(
    val sendId: String?,
    val receiveId: String,
    val type: Int,
    val content: String,
    val msgId: String,
)


//历史聊天记录对象
data class ChatHistory(
    val msgId: String,
    val myId: String,
    val friendId: String,
    val msg: String,
    val isMe: Boolean,
    val type: Int,
    var isRead: Boolean,
    val Date: Date,
)

//历史快照对象
data class ChatSnapshot(
    val myId: String,
    val friendId: String,
    val friendImg: String,
    val friendNickName: String,
    val Date: Date,
    val msg: String,
    val isRead: Boolean,
    val type: Int
)

data class UnSignMsg(
    val id: String,
    val type: Int,
    val sendUserId: String,
    val acceptUserId: String,
    val msg: String,
    val signFlag: Int,
    val createTime: Date,
)

enum class ResultStatus(val code: String) {
    ERROR("501"),
    OK("200"),
}

enum class MsgActionEnum(val type: Int, val content: String) {
    CONNECT(1, "第一次(或重连)初始化连接"),
    CHAT(2, "聊天消息"),
    SIGNED(3, "消息签收"),
    KEEPALIVE(4, "客户端保持心跳"),
    PULL_FRIEND(5, "拉取好友");
}

enum class MsgType(val type: Int, val content: String) {
    TEXT(1, "文本"),
    IMAGE(2, "图片"),
    APP(3, "应用程序")
}

data class DataContent(
    val action: Int,
    val msg: Msg,
    val extand: String,
)

data class Star(
    val userId: String,
    val userImg: String,
    val userName: String,
    val content: String,
    val time: Date,
    val size: Int,
    val type: Int
)


data class RegisterUser(
    val username: String,
    val password: String,
    val sex: String,
    val birthday: String,
    val school: String,
    val city: String,
)